{% from '@SyliusShop/shared/breadcrumbs.html.twig' import breadcrumbs as breadcrumbs %}

{% set items = [{ path: path('sylius_shop_homepage'), label: 'sylius.ui.home'|trans }] %}
{% set ancestors = taxon.ancestors|reverse %}

{% for ancestor in ancestors %}
    {% if ancestor.isRoot() or not ancestor.enabled %}
        {% set items = items|merge([{ label: ancestor.name }]) %}
    {% else %}
        {% set items = items|merge([{ path: path('sylius_shop_product_index', {'slug': ancestor.slug, '_locale': ancestor.translation.locale}), label: ancestor.name }]) %}
    {% endif %}
{% endfor %}

{% set items = items|merge([{ label: taxon.name, active: true }]) %}

{{ breadcrumbs(items) }}
